//
//  CircleButtonAnimationView.swift
//  Crypto
//
//  Created by DaleGuo on 2023/9/20.
//

import SwiftUI

// 定义一个圆圈放大的效果
struct CircleButtonAnimationView: View {
    @Binding var animate: Bool

    var body: some View {
        Circle()
            .stroke(lineWidth: 5)
            .scale(animate ? 1 : 0)
            .opacity(animate ? 0 : 1)
            .animation(animate ? Animation.easeOut : .none, value: animate)
    }
}

#Preview {
    CircleButtonAnimationView(animate: .constant(false))
}
